//389.找不同
//https://leetcode.cn/problems/find-the-difference/
class Solution {
public:
    char findTheDifference(string s, string t) {
        unordered_map<char,int> hash;
        for(char c:t) ++hash[c];
        for(char c:s)
        {
            if(hash.count(c))
            {
                if(hash[c] > 1) --hash[c];
                else hash.erase(c);
            }
            else return c;
        }
        return (hash.begin())->first;
    }
};